home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 39 / 039.d81 / loader maker (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  129 lines

  1. 10 poke53280,.:poke53281,.
  2. 15 print"[147][154]             [158]loader maker"
  3. 20 print"             by ken bunzel"
  4. 25 print"  [154]place a disk in the drive and press"
  5. 30 print"  space[154] to read the directory."
  6. 40 print"  then your loader program for the"
  7. 50 print"  disk will be created."
  8. 55 print"or, press return[154] to return to loadstar"
  9. 60 geta$:ifa$=chr$(13)then60030
  10. 70 ifa$=" "then80
  11. 75 goto60
  12. 80 print"[147]number of programs:":print"reading directory..."
  13. 85 dimpr$(144),le(144):open1,8,0,"$0"
  14. 90 get#1,a$,a$,a$,b$:le(l)=asc(a$+chr$(0))+256*asc(b$+chr$(0))
  15. 100 get#1,b$:ifst<>0then200
  16. 110 ifb$<>chr$(34)then100
  17. 120 c$=""
  18. 130 get#1,b$:ifb$<>chr$(34)thenc$=c$+b$:goto130
  19. 140 pr$(l)=c$
  20. 150 get#1,b$:ifb$=chr$(32)then150
  21. 160 c$=""
  22. 170 c$=c$+b$:get#1,b$:ifb$<>""then170
  23. 180 ifleft$(c$,3)="prg"thenl=l+1:print""tab(19)l
  24. 190 ifst=0then90
  25. 200 close1:l=l-1
  26. 210 ifl=-1thenprint"[147]         no programs on disk":fora=1to2000:next:goto10
  27. 220 print"         setting up files..."
  28. 225 ad=49152:fora=0tol:forb=1tolen(pr$(a))
  29. 230 pokead+b,asc(mid$(pr$(a),b,1)):nextb
  30. 240 pokead+b,13:pokead+b+1,le(a):ad=ad+20:nexta
  31. 250 ad=49152:a=0
  32. 260 ifa>lthen330
  33. 270 a$="":b=1
  34. 280 ifpeek(ad+b)=13then300
  35. 290 a$=a$+chr$(peek(ad+b)):b=b+1:goto280
  36. 300 le=peek(ad+b+1):print"[147][144]"a+1000" data "a$","mid$(str$(le),2)
  37. 310 print"a="a+1":ad="ad+20":l="l":goto260"
  38. 315 print"    please wait -- altering program[144]"
  39. 320 poke198,2:poke631,13:poke632,13:print"":end
  40. 330 a=10
  41. 340 ifa=340then370
  42. 350 print"[147][144]"a:print"a="a+5":l="l":goto340"
  43. 355 print"    please wait -- altering program[144]"
  44. 360 poke198,2:poke631,13:poke632,13:print"":end
  45. 370 print"[147][144] 400 l="l
  46. 380 fora=340to390step10:printa:next:print"run"
  47. 400 poke198,8:fora=631to638:pokea,13:next:print"":end
  48. 401 print"[147]355":print"401":print"402":print"run"
  49. 402 poke198,4:fora=1to4:poke630+a,13:next:end
  50. 405 goto50000
  51. 410 dimpr$(144),le(144)
  52. 415 poke53280,.:poke53281,.
  53. 420 forb=830to874:readc:pokeb,c:next
  54. 430 fora=0tol:readpr$(a),le(a):next
  55. 440 print"[147][154]";:forb=0to23:ifb>lthen460
  56. 450 printtab(9)le(b)tab(14)pr$(b):next
  57. 460 ch=0:re=18:co=5:print""
  58. 470 print"[145]"tab(10)"                     [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
  59. 480 printchr$(re)chr$(co)mid$(str$(le(ch)),2)tab(14)pr$(ch)
  60. 490 fora=1to40:geta$:ifa$=chr$(17)ora$=chr$(13)ora$=chr$(145)then530
  61. 500 nexta
  62. 510 ifre=18thenre=146:co=154:goto470
  63. 520 ifre=146thenre=18:co=5:goto470
  64. 530 re=18:co=5
  65. 540 ifa$=chr$(13)then660
  66. 550 print"[145][154]"tab(9)le(ch)tab(14)pr$(ch)
  67. 560 ifa$=chr$(17)then630
  68. 570 ch=ch-1:ifch<>-1then610
  69. 580 ch=l
  70. 590 ifl<24thenforb=1tol:print:next:goto470
  71. 600 print"[147]";:forb=ch-23toch:printtab(9)le(b)tab(14)pr$(b):next:goto470
  72. 610 ifpeek(214)=1thensys830
  73. 620 print"[145][145]":goto470
  74. 630 ch=ch+1:ifch<=lthenprint:goto470
  75. 640 ch=0:ifl<24thenprint"":goto470
  76. 650 goto440
  77. 660 print"[147][146]load"chr$(34)pr$(ch)chr$(34)",8,1"
  78. 670 poke198,5:poke631,13:poke632,82:poke633,85:poke634,78:poke635,13
  79. 680 print"":end
  80. 690 data162,240,189,167,6,157
  81. 700 data207,6,202,208,247,162
  82. 710 data240,189,183,5,157,223
  83. 720 data5,202,208,247,162,240
  84. 730 data189,199,4,157,239,4
  85. 740 data202,208,247,162,200,189
  86. 750 data255,3,157,39,4,202
  87. 760 data208,247,96
  88. 50000 poke53280,.:poke53281,.
  89. 50010 print"[147]               [158]loader maker"
  90. 50020 print"               by ken bunzel"
  91. 50030 print"        s [154]- save this menu"
  92. 50040 print"        c [154]- create another menu"
  93. 50050 print"        q [154]- quit"
  94. 50060 print"        press s[154], c[154], or q[154].":poke198,.
  95. 50070 a=peek(203):ifa<>13anda<>20anda<>62then50070
  96. 50080 ifa=62thengosub60000:goto50060
  97. 50085 ifa=13then50100
  98. 50090 ifa=20then50200
  99. 50100 print"enter filename:";
  100. 50110 gosub60500:ifb$=""then50000
  101. 50120 print"[147]       saving "b$" to disk..."
  102. 50130 print"[144]405"
  103. 50140 print"save"chr$(34)b$chr$(34)",8"
  104. 50150 print"405 goto50000"
  105. 50160 print"run"
  106. 50170 poke198,4:fora=1to4:poke630+a,13:next:end
  107. 50200 open15,8,15,"r0:loader maker=loader maker":input#15,er:close15
  108. 50210 ifer=63then50240
  109. 50220 print"         [150]loader maker not found!"
  110. 50230 fora=1to2000:next:goto50000
  111. 50240 print"[147]     loading loader maker...[144]"
  112. 50245 print"load"chr$(34)"loader maker"chr$(34)",8"
  113. 50250 print"run":poke198,2:poke631,13:poke632,13:end
  114. 60000 print"[145]  are you sure you want to quit? (y[154]/n[154])"
  115. 60010 a=peek(203):ifa<>25anda<>39then60010
  116. 60020 ifa=39thenprint"[145]                                      [145]":return
  117. 60030 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  118. 60040 ifer<>63thenend
  119. 60050 load"hello connect",8
  120. 60500 b$="":print"[164]";:poke198,.:fora=1to17
  121. 60510 geta$:ifa$=""then60510
  122. 60520 ifa$=chr$(13)thenprint"[157] ":return
  123. 60530 ifa$=chr$(20)anda>1thenprint"[157][157]  [157][157][164]";:a=a-1:b$=left$(b$,a-1):goto60510
  124. 60535 ifa=17then60510
  125. 60540 ifa$>=" "anda$<="z"then60570
  126. 60550 ifa$>="[193]"anda$<="[218]"then60570
  127. 60560 goto60510
  128. 60570 print"[157]"a$;:poke212,.:print"[164]";:b$=b$+a$:next
  129.